<?php
namespace app\index\controller;

//创建web servers

class SoapServer
{
    public function sayHi($str)
    {
        return 'hi,' . $str;
    }

    public function add($a, $b)
    {
        return $a + $b;
    }

}

$ss = new SoapServer(null, array('uri' => 'sampleA'));
$ss->setClass('SoapServer');
$ss->handle();